package ${package}.${moduleName}.service;

import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
import org.springframework.transaction.annotation.Transactional;
import ${package}.${moduleName}.domain.vo.${ClassName}VO;
import ${package}.${moduleName}.domain.form.${ClassName}Form;
import ${package}.${moduleName}.domain.query.${ClassName}Query;
import ${package}.${moduleName}.domain.entity.${ClassName}Entity;
import ${package}.mybatisplus.domain.vo.BasePageVO;

/**
 * ${tableComment}
 *
 * @author ${author}
 * @datetime ${datetime}
 */
public interface ${serviceClassName}Service extends IService<${ClassName}Entity> {

    /**
     * 分页数据
     * @param ${className}Query 查询对象
     * @return 分页查询数据
     */
    BasePageVO<${ClassName}VO> page(${ClassName}Query ${className}Query);

    /**
     * 新增数据
     * @param ${className}Form 表单数据
     * @return true: 新增成功; false: 新增失败
     */
    @Transactional(rollbackFor = Exception.class)
    boolean save(${ClassName}Form ${className}Form);

    /**
     * 更新数据
     * @param ${className}Form 表单数据
     * @return true: 更新成功; false: 更新失败
     */
    @Transactional(rollbackFor = Exception.class)
    boolean update(${ClassName}Form ${className}Form);

    <#-- 只有设置了主键类型, 才会生成 delete 方法 -->
    <#if pkType??>
    /**
     * 删除数据
     * @param ids ID 列表
     * @return true: 删除成功; false: 删除失败
     */
    @Transactional(rollbackFor = Exception.class)
    boolean deleteByIds(String ids);

    /**
     * 根据 ID 获取信息
     * @param id ID
     * @return 信息
     */
     ${ClassName}VO getInfoById(${pkType} id);
    </#if>
}